{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Graphs\n",
    "\n",
    "One of the common types of databases that we can build Q&A systems for are graph databases. LangChain comes with a number of built-in chains and agents that are compatible with graph query language dialects like Cypher, Neo4j, and MemGraph. They enable use cases such as:\n",
    "\n",
    "* Generating queries that will be run based on natural language questions,\n",
    "* Creating chatbots that can answer questions based on database data,\n",
    "* Building custom dashboards based on insights a user wants to analyze,\n",
    "\n",
    "and much more.\n",
    "\n",
    "## ⚠️ Security note ⚠️\n",
    "\n",
    "Building Q&A systems of graph databases might require executing model-generated database queries. There are inherent risks in doing this. Make sure that your database connection permissions are always scoped as narrowly as possible for your chain/agent's needs. This will mitigate though not eliminate the risks of building a model-driven system. For more on general security best practices, [see here](/docs/security).\n",
    "\n",
    "![graphgrag_usecase.png](../../../static/img/graph_usecase.png)\n",
    "\n",
    "> Employing database query templates within a semantic layer provides the advantage of bypassing the need for database query generation. This approach effectively eradicates security vulnerabilities linked to the generation of database queries.\n",
    "\n",
    "## Quickstart\n",
    "\n",
    "Head to the **[Quickstart](/docs/use_cases/graph/quickstart)** page to get started.\n",
    "\n",
    "## Advanced\n",
    "\n",
    "Once you've familiarized yourself with the basics, you can head to the advanced guides:\n",
    "\n",
    "* [Prompting strategies](/docs/use_cases/graph/prompting): Advanced prompt engineering techniques.\n",
    "* [Mapping values](/docs/use_cases/graph/mapping): Techniques for mapping values from questions to database.\n",
    "* [Semantic layer](/docs/use_cases/graph/semantic): Techniques for working implementing semantic layers."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Deno",
   "language": "typescript",
   "name": "deno"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "typescript",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
